// @algorithm @lc id=100339 lang=cpp
// @title nge-tou-zi-de-dian-shu-lcof

#include "algm/algm.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
    vector<double> dicesProbability(int n) {
        // n=1时的dp
        vector<double> dp(6, 1.0 / 6.0);
        for (int i = 2; i <= n; i++) {
            // n=i时，有i～6i，共计5*i+1种可能
            vector<double> tmp(5 * i + 1, 0);
            // 把dp里每一种情况上再分别乘以1～6
            for (int j = 0; j < (int)dp.size(); j++) {
                for (int k = 0; k < 6; k++) {
                    tmp[j + k] += dp[j] / 6.0;
                }
            }
            dp = tmp;
        }
        return dp;
    }
};